package org.hackystat.devcathlon.team;

import java.util.Set;
import org.hackystat.devcathlon.user.User;

/**
 * Provides information about a Devcathlon team. 
 * The team name should be a unique ID for this team. 
 * Clients create instances of Teams through the TeamManager class. 
 * @author Philip Johnson
 */
public class Team {
  /** The (unique) name of this team. */  
  private String name;
  /** The owner of this team. */
  private User owner;
  /** The set of members on this team. */
  private Set<User> members;

  /**
   * Creates a new team.  Teams are created through the TeamManager. 
   * @param name The (unique) name of the team.
   * @param owner The user who owns this team.  
   * @param members The set of members on this team. 
   */
  Team(String name, User owner, Set<User> members)  {
    this.name = name;
    this.owner = owner;
    this.members = members;
  }
  
  /**
   * Returns the name of this team. 
   * @return The name. 
   */
  public String getName() {
    return this.name;
  }
  
  /**
   * Returns the users who are members of this team. 
   * @return The users. 
   */
  public Set<User> getMembers() {
    return this.members;
  }

  /**
   * Returns the owner of this team. 
   * @return The team owner. 
   */
  public User getOwner() {
    return this.owner;
  }
}
